package com.tenc;

import com.tenc.config.annotation.AnonymousAccess;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;


@EnableFeignClients(basePackages = {"com.tenc.feign","com.tenc.feign.contacts"})
@EnableAsync
@RestController
@SpringBootApplication
@EnableTransactionManagement
@EnableCaching
@MapperScan("com.tenc.mapper")
public class EnterpriseWechatApplication {

    public static void main(String[] args) {
        SpringApplication.run(EnterpriseWechatApplication.class, args);
    }
    /**
     * 访问首页提示
     * @return /
     */
    @GetMapping("/")
    @AnonymousAccess
    public String index() {
        return "Backend service started successfully";
    }
}
